﻿
namespace MyFurion.Application.Dtos
{
    /// <summary>
    /// 用户登录信息
    /// </summary>
    public class LoginInput
    {
        /// <summary>
        /// 登录名
        /// </summary>
        [Required(ErrorMessage = "用户名不能为空")]
        public string LoginName { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        [Required(ErrorMessage = "密码不能为空")]
        public string Password { get; set; }
        /// <summary>
        /// 验证码Token
        /// </summary>
        [Required(ErrorMessage = "验证码Token不能为空")]
        public string CaptchaToken { get; set; }
        /// <summary>
        /// 验证码
        /// </summary>
        [Required(ErrorMessage = "验证码不能为空")]
        public string Captcha { get; set; }       
    }
    /// <summary>
    /// 用户登录信息(无验证码)
    /// </summary>
    public class LoginNoCaptchaInput
    {
        /// <summary>
        /// 登录名
        /// </summary>
        [Required(ErrorMessage = "用户名不能为空")]
        public string LoginName { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        [Required(ErrorMessage = "密码不能为空")]
        public string Password { get; set; }
    }
    /// <summary>
    /// 获取登录用户信息
    /// </summary>
    public class LoginUserInfo
    {
        /// <summary>
        /// 用户姓名
        /// </summary>
        public string UserName { get; set; }
        /// <summary>
        /// 昵称
        /// </summary>
        public string NickName { get; set; }
        /// <summary>
        /// 所属机构名称
        /// </summary>
        public string OrgName { get; set; }
        /// <summary>
        /// 是否超级管理员
        /// </summary>
        public bool IsSuperAdmin { get; set; }
        /// <summary>
        /// 是否初始化密码
        /// </summary>
        public bool IsDefaultPwd { get; set; }
        /// <summary>
        /// 菜单权限
        /// </summary>
        public List<PermissionInfo> MenuPer { get; set; } = new();
    }
    /// <summary>
    /// 菜单权限信息
    /// </summary>
    public class PermissionInfo
    {
        /// <summary>
        /// 菜单名称
        /// </summary>
        public string MenuName { get; set; } = string.Empty;
        /// <summary>
        /// 菜单Url
        /// </summary>
        public string MenuUrl { get; set; } = string.Empty;
        /// <summary>
        /// 菜单图标
        /// </summary>
        public string MenuIcon { get; set; } = string.Empty;
        /// <summary>
        /// 菜单类型
        /// </summary>
        public string MenuType { get; set; } = string.Empty;        
        /// <summary>
        /// 按钮操作权限
        /// </summary>
        public List<string>BtnPer { get; set; } = new();
        /// <summary>
        /// 下级菜单权限
        /// </summary>
        public List<PermissionInfo> Children { get; set; } = new();
    }
}
